package com.naiterui.ehp.bs.pc.modules.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.pc.common.vo.PageParamsVO;
import com.naiterui.ehp.bs.pc.common.vo.PageVO;
import com.naiterui.ehp.bs.pc.modules.sys.entity.User;
import java.util.List;
import java.util.Set;

/**
 * 系统用户
 */
public interface IUserService extends IService<User> {

  PageVO<User> queryPage(PageParamsVO pageParamsVO, User user);

  /**
   * 查询用户的所有菜单ID
   */
  List<Long> queryAllMenuId(Long userId);

  /**
   * 修改用户
   */
  void update(User user) throws BusinessException;

  /**
   * 修改密码
   */
  void updatePassword(User user, String password, String newPassword) throws BusinessException;

  Set<String> getPermission(Long userId);

  User loadUserByUsername(String username) throws BusinessException;
}
